package Mains;

import Contracts.TerrainServiceContract;
import Impl.Terrain;
import Impl.Type;
import Services.TerrainService;

public class MainContractTerrainService {
	public static void main(String[] args){
		TerrainService terrain = new Terrain();
		TerrainService newTerrain = new Terrain();
		TerrainServiceContract contratTerrain = new TerrainServiceContract(terrain);
		
		contratTerrain.init(10, 20);
		contratTerrain.addObject(1, 4, Type.Mur);
		contratTerrain.startTerrain();
		contratTerrain.addObject(2, 4, Type.SortieFermee);
		contratTerrain.addObject(3, 4, Type.Diamant);
		contratTerrain.startTerrain();
		
		contratTerrain.moveObject(3, 4, 7, 8);
		contratTerrain.putHero(7, 8);
		contratTerrain.validate();
		contratTerrain.openDoor();
		
		newTerrain.clone(contratTerrain);
		if(newTerrain.equals(contratTerrain))
			System.out.println("contrat OK");
	}
}
